<?php 
/**
 * 
 * pushsvr.php?c=xxx&a=xxx&v=1&other_arguments
 */
define("PS_PATH",dirname(__FILE__));
// $_GET['lgl']='lgl';var_dump($_GET);
require PS_PATH.'/core/preAction.php';
// var_dump($_GET);
import('verifier.class.php');

list($__controller,$__action,$__version) = parseActionRequst();
log_i("Requst contoller [$__controller] with action [$__action] and version [$__version]");

//执行用户代码前先进行权限校验
//TODO 日后版本可以使用路由表+权限分级的方式来实现精细权限控制
//route:
//  	requst_n = controller,action,version,privillage.
log_i("Verifing the reqeust..."); 
$verifier =new Verifier();
if(!$verifier->verify()){
	$verifier->do_fix();
}

log_i("Running the controller and action...");
psRun();

